import { createRouter, createWebHistory, RouteRecordRaw } from 'vue-router'
import TestForm from '../views/form/index.vue'
import TestCrud from '../views/crud/Index.vue'

const routes: Array<RouteRecordRaw> = [
  { path: '/', name: 'Home', redirect: '/form' },
  { path: '/form', name: 'Form', component: TestForm, meta: { title: '表单测试' } },
  { path: '/crud', name: 'Crud', component: TestCrud, meta: { title: '表格测试' } },
]

const router = createRouter({ history: createWebHistory(), routes })

export default router
